<template>
	<view class="resume-list">
		<!-- 简历列表 -->
		<template v-for="(item,index) in recode" :key="index">
			<view class="box">
				<view class="flex-center">
					<view>
						<image mode="widthFix" class="title-icon" src="/static/img/resume/resume.svg"></image>
						<text>{{item.job_name}}</text>
						<view class="jobDes">
							<image class="des-icon" mode="widthFix" src="/static/img/jobDetails/city.svg"></image>
							<text>{{item.jcompany_name}}</text>
						</view>
					</view>
				</view>
			</view>
		</template>
	</view>
</template>

<script setup>
	import loginCheck from "/hooks/loginCheck.js"
	import {
		req,
		post
	} from "/hooks/req.js"
	import {
		decrypt,
		encrypt
	} from "@/hooks/encrypt.js"
	import {
		onShow
	} from "@dcloudio/uni-app"
	import {
		ref,
		inject
	} from "vue"
	const $root = inject("$root")
	let token = ""
	const recode = ref([])

	onShow(() => {
		if (loginCheck()) {
			token = decrypt(JSON.parse(uni.getStorageSync("userData")).token)
			postresume()
		}
	})
	const postresume = () => {
		req($root + '/postresume/', token).then(result => {
			if (result.data.code == 200) {
				recode.value = result.data.data
			}
		})
	}
</script>

<style>

</style>